{*
 * This file is part of the Agora distribution. 
 * Detailed copyright and licensing information can be found
 * in the gpl-3.0.txt file which should be included in the distribution.
 * 
 * @version		$Id: 3.0.14 Olympus 2010-09-28 rammstein4o $
 * @copyright  2007 - 2010 jVitals
 * @license   GPLv3 Open Source
 * @link       http://jvitals.com
 * @since      File available since initial release
 *}
<tr class="ag_{$topic.status}">
	<td class="ag_leftend">
	
		{* joopport added *}
		{if $topic.forum_type or $forum.forum_type} {*первое условие - это при вызове функции loadall в модели topic.php (это когда у нас вью топиковый, второе , если список топиков получен из модели forum.php (это когда вью форумный и смотрим список топиков в форуме)  *}
		<div style="color:orange">*</div>
		{/if}
		{* end joopport *}
			
		<div class="{$topic.ref_name}">
		{if $topic.status}
		<div class="ag_{$topic.status}">&nbsp;</div>
		{elseif isset($topic.score)}{* Used in search *}
		<div class="ag_search_goto">&nbsp;</div>
		{/if}
		</div>
	</td>
	<td class="ag_spacer">
		
		{* joopport added *}
		{if $topic.forum_type or $forum.forum_type} {*если это суппортный топик*}
			{if ($agora_user.is_superadmin != 1 AND !$access.can_moderate) and ($topic.joopstatus == 2 or $topic.joopstatus == 3)} {*если это не админ и не модератор и при этом кто-то от кого-то ждет ответа*}
				{if $topic.joopstatus == 2}
					<img src="{image src=support/3.png}" alt="" />
				{elseif $topic.joopstatus == 3}
					<img src="{image src=support/2.png}" alt="" />
				{/if}
			{else}			
				<img src="{image src=support/`$topic.joopstatus`.png}" alt="" />
			{/if}
		{else}					
		{* end joopport *}
	
		{if $topic.icon_topic}
		<img src="{image src=icons/`$topic.icon_topic`.png}" alt="" />
		{else}
		<img src="{image src=icons/info.png}" alt="" />
		{/if}
		
		{* joopport added *}
		{/if}			
		{* end joopport *}
		
	</td>
	<td class="ag_column">
		{if $topic.id}
		<div class="ag_forumName">
			<a href="{url task=topic id=$topic.id}">
				{$topic.subject|truncate:70:'...'}
			</a>
		</div>
		<div class="ag_forumDesc">
			<span class="ag_byuser"><strong>##AUTHOR##:</strong> {if $agora_config.o_fullnames_enabled}{$topic.u_fullname|nomail|escape}{else}{$topic.poster|nomail|escape}{/if}</span>
		</div>
		
		{if 1 < $topic.num_pages}
		<div class="ag_forumPages">
			<span class="ag_pages"><strong>##Page##:</strong> {assign var=elipsis value='...'}{section name=num loop=$topic.num_pages}{if 3 < $smarty.section.num.iteration and $topic.num_pages > $smarty.section.num.iteration + 2}{$elipsis}{assign var=elipsis value=''}{continue}{/if} <a href="{url task=topic id=$topic.id p=$smarty.section.num.iteration}"> {$smarty.section.num.iteration} </a> {/section}</span>
		</div>
		{/if}
		
		{/if}
		<div class="ag_forumDesc">
			{$topic.descrip_t}
			{if isset($topic.forum_name)}
				{if $topic.descrip_t <> ''}<br />{/if}
				<span class="ag_byuser"><strong>##Forum##:</strong> <a href="{url task=forum id=$topic.forum_id}" title="{$topic.forum_name}">{$topic.forum_name}</a></span>
			{/if}
		</div>
	</td>
	<td class="ag_topic">
		<p>
			{if isset($topic.rating) && !is_null($topic.rating)}
			<a href="{url task=rate action=view id=$topic.id}">
				<img src="{$star_path}{$topic.rating_star}.png" alt="{$topic.rating} Stars" title="{$topic.rating|string_format:"%.2f"} ##Stars##" />
			</a>
			{elseif isset($star_path)}
			<img src="{$star_path}{$topic.rating_star}.png" alt="{$topic.rating} Stars" title="{$topic.rating|string_format:"%.2f"} ##Stars##" />
			{/if}
		</p>
		<p class="ag_color"><strong>{$topic.num_replies}</strong> ##Replies##</p>
		<p><strong>{$topic.num_views}</strong> ##Views##</p>
	</td>
	<td class="ag_lastpost">
		<span class="ag_byuser">
			<span>
				{if $agora_user.reverse_posts}
				<a class="permatip" href="{url task=topic id=$topic.id}#p{$topic.last_post_id}">
				{else}
				<a class="permatip" href="{url task=topic id=$topic.id p=$topic.num_pages}#p{$topic.last_post_id}">
				{/if}
				<span>{$topic.postcontent|truncate:250:'...'}</span>
				{$topic.last_post|agora_date}
				</a>
			</span><br />
			<strong>##by##</strong> {if $agora_config.o_fullnames_enabled && !empty($topic.lu_fullname)}{$topic.lu_fullname|nomail|escape}{else}{$topic.last_poster|nomail|escape}{/if}
		</span>
	</td>
	{* Used in search *}
	{if isset($topic.score)}
	<td class="ag_topic3">
		<span class="ag_post_score">{$topic.score|string_format:"%.2f"}</span>
	</td>
	{/if}
</tr>